package com.finalist.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.search.annotations.DocumentId;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * 地区标准码
 * 
 * @author 
 * 
 */
@Entity
@Table(name = "area_standard_code")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "area_standard_code_sequence")
public class AreaStandardCode extends BaseEntity{
	
	private static final long serialVersionUID = 3333333015967525827L;
	/** ID */
	private Long id;
	/**地区代码*/
	private String areaCode;
	/**地区上级代码*/
	private String areaHigherCode;
	/**地区名称*/
	private String areaName;
	/**地区级别*/
	private String areaLevel="2";
	/**城市级别*/
	private String cityLevel;
	/**是否末级*/
	private Boolean isLastLever;
	
	
	/**
	 * 获取ID
	 * 
	 * @return ID
	 */
	@JsonProperty
	@DocumentId
	@Id
	// MySQL/SQLServer: @GeneratedValue(strategy = GenerationType.AUTO)
	// Oracle: @GeneratedValue(strategy = GenerationType.AUTO, generator = "sequenceGenerator")
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "sequenceGenerator")
	public Long getId() {
		return id;
	}

	/**
	 * 设置ID
	 * 
	 * @param id
	 *            ID
	 */
	public void setId(Long id) {
		this.id = id;
	}
	public String getAreaCode() {
		return areaCode;
	}
	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}
	public String getAreaHigherCode() {
		return areaHigherCode;
	}
	public void setAreaHigherCode(String areaHigherCode) {
		this.areaHigherCode = areaHigherCode;
	}
	public String getAreaName() {
		return areaName;
	}
	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}
	public String getAreaLevel() {
		return areaLevel;
	}
	public void setAreaLevel(String areaLevel) {
		this.areaLevel = areaLevel;
	}
	public String getCityLevel() {
		return cityLevel;
	}
	public void setCityLevel(String cityLevel) {
		this.cityLevel = cityLevel;
	}
	public Boolean getIsLastLever() {
		return isLastLever;
	}
	public void setIsLastLever(Boolean isLastLever) {
		this.isLastLever = isLastLever;
	}
	
	
	
}
